﻿using Furion.DynamicApiController;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
using WebApplication2.Controller.Dto;
using WebApplication2.Tools;

namespace WebApplication2.Controller
{
    public class WebHookController : IDynamicApiController
    {

        public string Get([FromQuery] string buildId, [FromQuery] string buildName, [FromQuery] string type, [FromQuery] string statusMsg, [FromQuery] string triggerTime)
        {
            var content = $"Hello from AAAController  buildId:{buildId},buildName:{buildName},type:{type},statusMsg:{statusMsg},triggerTime:{triggerTime}";
            EmailHelper.SendEmial($"webhook: {buildName} - {type} {DateTime.Now:yyyy-MM-dd HH:mm:ss}", content, "245851619@qq.com");
            return content;
        }
    }
}
